home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d13 / portst11.arc / PORTTEST.DOC < prev    next >
Text File  |  1991-02-11  |  24KB  |  718 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.                                       PORT TEST
  15.  
  16.  
  17.                      Comprehensive I/O Port Diagnostics for PCs
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.                                     USER'S MANUAL
  25.  
  26.                                      Version 1.1
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.                               MICROSYSTEMS DEVELOPMENT
  37.                                4100 Moorpark Ave. #104
  38.                               San Jose, CA  95117   USA
  39.                                 Phone:  (408)296-4000
  40.                                  FAX:  (408)296-5877
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.                     Copyright (C) MicroSystems Development   1990
  49.                                  All rights reserved
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.           DISCLAIMER
  86.  
  87.           MicroSystems Development makes no warranty of any kind, express
  88.           or implied, including without limitation, any warranties of
  89.           merchantability and/or fitness for any specific application or
  90.           use.  MicroSystems Development shall not be liable for ANY loss
  91.           or damage arising from a failure of this program to operate in
  92.           the manner described, or in a manner desired by the user.
  93.           MicroSystems Development shall not be liable for any damage to
  94.           data or property which may be caused directly or indirectly by
  95.           use of the program.
  96.  
  97.           IN NO EVENT SHALL MICROSYSTEMS DEVELOPMENT OR ITS SUPPLIERS BE
  98.           LIABLE FOR ANY CONSEQUENTIAL, INCIDENTAL OR EXEMPLARY DAMAGES
  99.           INCLUDING, BUT NOT LIMITED TO LOSS OF PROFITS OR REVENUES, LOSS
  100.           OF USE OF ANY PRODUCT, SERVICE OR REPLACEMENT COSTS, OR CLAIMS BY
  101.           ANY THIRD PARTY.
  102.  
  103.  
  104.  
  105.           COPYRIGHT AND TRADEMARK INFORMATION
  106.  
  107.           The software code and screen displays used in PORT TEST are the
  108.           sole property of MicroSystems Development, and may not be copied,
  109.           in any form, in whole or in part, or included in any other
  110.           program or document without the express written permission of
  111.           MicroSystems Development.
  112.  
  113.  
  114.           IBM, IBM PC, IBM XT and IBM AT are registered trademarks of
  115.                International Business Machines Corporation.
  116.  
  117.           MS-DOS is a trademark of Microsoft Corporation.
  118.  
  119.           PORT TEST is a trademark of MicroSystems Development.
  120.  
  121.           MicroSystems Development is a division of
  122.                MicroSystems Development Technologies, Inc.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.                                   TABLE OF CONTENTS
  137.  
  138.  
  139.           1.0  BACKGROUND INFORMATION................................1
  140.                1.1  Serial Port Basics...............................1
  141.                1.2  Parallel Port Basics.............................1
  142.  
  143.           2.0  ADDRESSING SCHEMES....................................3
  144.                2.1  Port Addressing..................................3
  145.                2.2  What the BIOS does...............................3
  146.                2.3  What DOS does....................................4
  147.                2.4  Logical vs. Physical Addresses...................4
  148.                2.5  Interrupt Usage..................................5
  149.  
  150.           3.0  SERIAL AND PARALLEL TESTS.............................6
  151.  
  152.           4.0  COMMAND LINE PARAMETERS...............................7
  153.  
  154.           CUSTOMER FEEDBACK FORM.....................................8
  155.  
  156.  
  157.  
  158.           In addition to tests and diagnostics, PORT TEST can do
  159.           the following:
  160.  
  161.       
  162.                porttest swap lpt1 lpt2
  163.                Swaps table addresses for lpt1 and lpt2.
  164.  
  165.                porttest com3:19200,n,8,1
  166.                Set baud rate, parity, data bits, and stop bits for a serial
  167.                port.
  168.  
  169.                porttest as 280
  170.                Adds address 0280 hex to the serial port table as the next
  171.                logical com port.
  172.  
  173.                porttest ds
  174.                Automatically detects serial ports and updates the table.
  175.  
  176.           And more...
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.           1.0  INTRODUCTION
  205.  
  206.                When computer information, known as data, is sent from one
  207.           device to another, it is carried by a wire cable.  Data is
  208.           generally sent in one of two basic ways.  Many bits at a time
  209.           over many wires in the cable is known as parallel transfer.
  210.           Sending one bit at a time over one wire is known as serial
  211.           transfer.  Each type of transfer has its own advantages and
  212.           disadvantages.  The serial or parallel connections to the
  213.           computer are called PORTS.  Collectively, they are called
  214.           Input/Output, or I/O ports.
  215.  
  216.                PORT TEST is comprehensive diagnostic program for I/O ports
  217.           installed in IBM PC and AT compatibles computers running DOS.  It
  218.           is useful to identify ports, manipulate system tables, test the
  219.           ports, and to identify and correct problems.  This manual is
  220.           intended to supplement the information provided in PORT TEST by
  221.           explaining the ways in which I/O ports are commonly used and
  222.           implemented in IBM compatible PCs.  It also describes what each
  223.           test does and provides information on what to look for if any of
  224.           the tests fail.
  225.  
  226.           1.1  SERIAL PORT BASICS
  227.  
  228.                The PC serial port uses voltages and connectors established
  229.           by the Electronic Industries Association (EIA) standard
  230.           specification known as RS-232C.  In addition to one bit of data,
  231.           other control signals are also sent and received.  Sending data
  232.           one bit at a time is relatively slow, but serial ports have the
  233.           advantage of using fewer wires to connect two devices and being
  234.           able to communicate over relatively long cable distances.  Most
  235.           serial ports can easily communicate over 100 ft of cable.  Data
  236.           is sent using +12 volts and -12 volts to represent a 0 or a 1
  237.           data bit.  In addition, there are a wide variety of serial
  238.           peripherals available which make use of the standard RS-232C
  239.           specification.  Furthermore, recent advances have made serial
  240.           data transmission reliable at higher data rates.  These data
  241.           rates are referred to as "baud" rates.
  242.  
  243.                The heart of all serial ports is an Asychronous
  244.           Communications Element, referred to as an ACE.  The CPU reads and
  245.           writes a byte (8 bits) of data to this chip, and the ACE handles
  246.           the serial transmissions and other functions related to the RS-
  247.           232C specification.  The ACE used in most PC & XT type (8088 and
  248.           8086) systems is the INS8250B or equivalent.  Most AT class
  249.           machines (80286 & above) use the NS16450 device.  The 16450 chip
  250.           is designed to handle the higher data bus rates of the faster
  251.           computers.  The serial data communications however is identical
  252.           to the 8250.  It is beyond the scope of this manual to describe
  253.           the detailed workings of these chips.  Refer to the
  254.           manufacturer's data sheets for more detailed information.
  255.  
  256.  
  257.           1.2  PARALLEL PORT BASICS
  258.  
  259.                Eight bits of data are transferred at a time over PC
  260.           parallel ports.  Data is sent using +5 volts and 0 volts to
  261.  
  262.           1                                       PORT TEST User's Manual
  263.  
  264.  
  265.  
  266.  
  267.  
  268.           represent a 1 or a 0 data bit.  As you might expect, data can be
  269.           transferred relatively fast in this manner.  The disadvantages of
  270.           this method is that more wires are needed and that most common
  271.           parallel ports can only work reliably at distances of under 20
  272.           feet.
  273.  
  274.                Unlike serial ports which rely on a chip to do the data
  275.           transmission, parallel data is handled entirely with software.
  276.           Parallel ports have three registers, one for data out, one for
  277.           output control lines, and one for input control lines.
  278.  
  279.                The way is which data is transmitted over parallel ports
  280.           varies, but a general description follows.  To send a byte of
  281.           data, the software outputs the byte to the data lines, then
  282.           pulses the STROBE output.  The device on the other end (normally
  283.           a printer) then asserts its BUSY line.  The PC waits for BUSY to
  284.           go away before sending the next byte.  In other implementations,
  285.           the ACKNOWLEDGE line is used for the printer to signal to the PC
  286.           that it has received the data.
  287.  
  288.                The other control lines are used for various purposes.  On
  289.           the printer side, PAPER-END is a signal to the PC that the
  290.           printer is out of paper.  The printer also sends a SELECTED
  291.           signal to the PC indicating that it is 'on line' and ready to
  292.           receive data.  The ERROR signal from the printer can be used for
  293.           any type of error that would cause the printer to be unable to
  294.           receive data.  In general, if any of these signals are asserted,
  295.           BUSY is also asserted.
  296.  
  297.                The PC has three additional output control lines.  Usage of
  298.           these lines varies with the particular software and printer in
  299.           use.  In the original PC implementation, they are used as
  300.           follows:  AUTOFEED tells the printer to automatically insert a
  301.           line feed after each carriage return.  INIT initializes the
  302.           printer upon power up.  SELECT deselects the printer and takes it
  303.           'off line'.  SELECT was most often used as a method to signal the
  304.           operator that some attention was required.  For example, when the
  305.           software needed to change to a different font, it would deselect
  306.           the printer.  This would cause the printer to turn off its
  307.           SELECTED line and its front panel light.  The user would then
  308.           change the print wheel in the printer and press the SELECT button
  309.           on the printer.  The printer would then turn on its SELECTED line
  310.           signalling the software to proceed.  Many printers will stay in
  311.           the 'off line' condition for as long as SELECT or INIT are
  312.           asserted even if the SELECT button is pressed.
  313.  
  314.                As stated earlier, not all of these controls lines are used
  315.           in the same manner.  Some of the latest laser printers on the
  316.           market ignore all the control lines to it except for the STROBE
  317.           line.
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.           2                                       PORT TEST User's Manual
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.           2.0  ADDRESSING SCHEMES
  337.  
  338.           2.1 PORT ADDRESSING
  339.  
  340.                Any I/O device in a PC must be located at a particular
  341.           address.  Actually, a serial port consists of eight addresses and
  342.           a parallel port has three.  The address used to refer to a
  343.           particular port is the first or BASE address.  For both serial
  344.           and parallel ports, this first address is where the data to be
  345.           transferred is read and written.
  346.  
  347.                These addresses are the PHYSICAL addresses of the ports.  It
  348.           is where the Central Processing Unit (CPU) of the PC must read or
  349.           write data to send or receive data over a port.  There are no set
  350.           rules for what addresses must be used for ports, but some
  351.           commonly used addresses are supported by most manufacturers.
  352.           Generally, the first two serial ports are at physical addresses
  353.           3F8 and 2F8.  These are referred to as COM1 and COM2, the LOGICAL
  354.           addresses.   Generally, parallel ports are located at addresses
  355.           3BC, 378 and 278, which are referred to as LPT1, LPT2, and LPT3.
  356.           Many monitor cards have a parallel port built in.  In these
  357.           cases, the port is usually at 3BC.
  358.  
  359.           NOTE:  The physical addresses are shown in hexadecimal notation.
  360.  
  361.  
  362.           2.2  WHAT THE BIOS DOES
  363.  
  364.                Most PC BIOS routines do a quick check upon power up to
  365.           determine how many serial and parallel ports are installed in a
  366.           system.  They examine specific addresses by writing to them, then
  367.           reading them back to determine if a device is present at that
  368.           address.  The BIOS then places the address of each responding
  369.           device in a table in RAM located at 40:0 for serial ports and at
  370.           40:8 for parallel ports.
  371.  
  372.                There are eight bytes at each of the above locations
  373.           reserved for port addresses.  Since a port address is two bytes,
  374.           up to four serial and four parallel addresses can be put in the
  375.           tables.
  376.  
  377.                For example, for a system with two serial ports and two
  378.           parallel ports, typical tables might be:
  379.  
  380.                Serial Port table:       Parallel port table:
  381.                ADDRESS    DATA          ADDRESS    DATA
  382.                 40:0      F8 03          40:8      BC 03
  383.                 40:2      F8 02          40:A      78 03
  384.                 40:4      00 00          40:C      00 00
  385.                 40:6      00 00          40:E      00 00
  386.  
  387.           Note:  The high & low bytes of the address are reversed in the
  388.           tables.
  389.  
  390.  
  391.  
  392.  
  393.  
  394.           3                                       PORT TEST User's Manual
  395.  
  396.  
  397.  
  398.  
  399.  
  400.           2.3  WHAT DOS DOES
  401.  
  402.                After a PC has booted and the BIOS is no longer in control,
  403.           DOS uses the addresses in these tables as COM1, COM2, etc. for
  404.           serial ports, and LPT1, LPT2, etc. for parallel ports.  For
  405.           example, DOS includes a program called MODE to set various
  406.           parameters such as the baud rate, of a port.  In order to use the
  407.           MODE command, the user must refer to the desired port by its COM
  408.           or LPT assignment.  The physical address used is the one stored
  409.           in the table.  It is very possible that COM1 in one system is not
  410.           at the same physical address as COM1 in another system.
  411.  
  412.                In order for DOS to recognize a COM or LPT number, there
  413.           must be a valid address listed in the table, and there can be no
  414.           gaps.  If there is a zero entry in the table, DOS considers that
  415.           the end of the list.  Therefore, as far as DOS is concerned, it
  416.           is impossible to have a COM1 & a COM4 without having a COM2 &
  417.           COM3 also!  Other software may report differently as explained
  418.           below.
  419.  
  420.  
  421.           2.4  LOGICAL VS. PHYSICAL ADDRESSES
  422.  
  423.                Many BIOS routines only check for two serial ports and three
  424.           parallel ports.  As PCs became more popular, the need for more
  425.           ports grew.  This fact was 'fixed' by DOS Versions 3.3 and
  426.           higher, which will recognize up to four COM and four LPT ports.
  427.           However, DOS will only recognize a logical port whose physical
  428.           address has been placed in the RAM table.  If the BIOS doesn't
  429.           put the physical address there upon power up, DOS won't recognize
  430.           a logical port even when the hardware is properly configured and
  431.           installed!
  432.  
  433.                If you need to use DOS to support more ports than your BIOS
  434.           will detect and install, PORT TEST can be used to place the
  435.           correct address in the system tables.  You can use the
  436.           interactive mode, but PORT TEST's batch mode was specifically
  437.           designed for this purpose.
  438.  
  439.                Place the command:  porttest /ds /dp  in your autoexec.bat
  440.           file to automatically detect serial and detect parallel ports in
  441.           your system upon power up.  These ports will now be recognized by
  442.           DOS.  See "Command Line Parameters" for more information.
  443.  
  444.           NOTE:      Many application programs do not use DOS to interface
  445.           to ports, so that it may not be necessary to include a port's
  446.           address in the system tables.  However, you must place the
  447.           address in the table in order to test a port with PORT TEST.
  448.  
  449.                Considerable confusion exists regarding proper logical and
  450.           physical port address.  Strictly speaking, there is no proper
  451.           physical address for any of the logical ports.  The logical port
  452.           structure permits any physical address to be placed into its
  453.           tables.
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.           4                                       PORT TEST User's Manual
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.                Many application programs access ports directly, and do not
  468.           use the built in routines in the hardware's BIOS.  This is
  469.           usually done because the application needs a more sophisticated
  470.           device driver than is provided by the BIOS.  When this is the
  471.           case, the logical port addresses are not always used properly.
  472.           Some applications access ports directly, but properly determine
  473.           the physical address from the logical address by using the table
  474.           at 40:0.  Other programs do not use logical addresses at all, and
  475.           just refer to physical addresses.  Still others convert logical
  476.           to physical addresses using their own table.  In this case, the
  477.           program could report that there is a COM1 and a COM4 installed
  478.           with no COM2 or COM3!
  479.  
  480.  
  481.           2.5  INTERRUPT USAGE
  482.  
  483.                In addition to a serial port's registers, the ACE also has
  484.           the ability to interrupt the processor, either after it has
  485.           transmitted a byte of data, or after it has received one.
  486.           Ideally, the interrupt request line that each port uses should be
  487.           unique, but there are not always enough interrupts to go around.
  488.           Therefore, interrupts are sometimes used by more than one device.
  489.           This is ok as long as only one of the devices is active at a
  490.           time.
  491.  
  492.                A standard PC has eight hardware interrupt request lines.
  493.           Often, IRQ4 is used for the serial port at address 3F8 and IRQ3
  494.           is used for the port at address 2F8.  This is what PORT TEST
  495.           assumes unless told otherwise.  For other serial ports, the user
  496.           must assign the proper IRQ number (if any) in PORT TEST.  If left
  497.           unassigned, PORT TEST will skip the interrupt tests.
  498.  
  499.                Most I/O cards have jumpers to select which interrupt will
  500.           be used.  If there are conflicts, the user should examine these
  501.           jumpers to determine the cause of conflict.
  502.  
  503.                Some parallel ports can be configured to use IRQ7.  When
  504.           enabled, the processor will receive an interrupt when
  505.           /ACKNOWLEDGE (pin 10) transitions from high to low.  This is not
  506.           supported on all cards and few applications use this feature.
  507.           PORT TEST does not test parallel port interrupts.
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.           5                                       PORT TEST User's Manual
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.           3.0  SERIAL AND PARALLEL TESTS
  535.  
  536.  
  537.                Detailed information on the content of the tests is in the
  538.           manual which comes with the registered version of PORT TEST.
  539.  
  540.                 
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.           6
  592.                                                   PORT TEST User's Manual
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.           4.0  COMMAND LINE PARAMETERS
  601.  
  602.                In addition to its interactive mode, PORT TEST supports
  603.           several command line parameters as follows:
  604.  
  605.           Usage:    porttest [mode switches] [batch commands]
  606.  
  607.                All command line parameters are optional.
  608.  
  609.                mode switches:
  610.                     /p  = Use the system's default print screen handler
  611.                Normally PORT TEST uses its own print screen handler so that
  612.                linedraw and other non printable characters are replaced
  613.                before printing.  If your printer has the capability to
  614.                print these characters, then use this command line option to
  615.                turn off PORT TEST's character translation when doing a
  616.                Print Screen.
  617.  
  618.                     /m  = force Monochrome on color monitors
  619.                     
  620.                     /i  force interactive mode
  621.                          (default when no batch args)
  622.  
  623.                batch commands:
  624.  
  625.                detectserial        OR ds        ->  detect serial ports
  626.                detectparallel      OR dp        ->  detect parallel ports
  627.                addserial <hex>     OR as <hex>  ->  add serial port
  628.                addparallel <hex>   OR ap <hex>  ->  add parallel port
  629.                com#:<b>,<p>,<d>,<s>             ->  set serial parameters
  630.                addserial <hex>:<b>,<p>,<d>,<s>  ->  add and set parameters
  631.                delete com# OR delete lpt#       ->  delete port
  632.                swap com# com# OR swap lpt# lpt# ->  swap ports
  633.  
  634.                Examples of command line usage:
  635.  
  636.                porttest ds
  637.                Automatically detects serial ports and updates the table.
  638.  
  639.                porttest as 280
  640.                Adds address 0280 hex to the serial port table as the next
  641.                logical com port.
  642.  
  643.                porttest com3:9600,n,8,1
  644.                Set baud rate, parity, data bits, and stop bits for a serial
  645.                port.
  646.  
  647.                porttest swap lpt1 lpt2
  648.                Swaps table addresses for lpt1 and lpt2.
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.           7                                       PORT TEST User's Manual
  659.  
  660.  
  661.  
  662.  
  663.  
  664.           CUSTOMER FEEDBACK FORM
  665.  
  666.           We continue to strive to provide a quality product.  Your
  667.           comments, suggestions, criticisms, etc. are most welcome.  Just
  668.           fill out this form and send or fax it to us.
  669.  
  670.           Brand and model of computer:______________________________
  671.  
  672.           Comment (  ) Suggestion  (  ) Criticism (  )  Problem (  )
  673.           Other_____________________________________________________
  674.  
  675.           __________________________________________________________
  676.  
  677.           __________________________________________________________
  678.  
  679.           __________________________________________________________
  680.  
  681.           __________________________________________________________
  682.  
  683.           __________________________________________________________
  684.  
  685.           __________________________________________________________
  686.  
  687.           __________________________________________________________
  688.  
  689.           __________________________________________________________
  690.  
  691.           __________________________________________________________
  692.  
  693.           __________________________________________________________
  694.  
  695.           __________________________________________________________
  696.  
  697.           Name:  _____________________________________
  698.  
  699.           Company:  __________________________________
  700.  
  701.           Address:  __________________________________
  702.  
  703.           City, State, Zip:  _________________________
  704.  
  705.           Phone:  ______________________  Fax:  ______
  706.  
  707.           Do you need a reply?  _________   Are you a registered user?     
  708.  
  709.           We guarantee a reply to all registered users who request one.
  710.  
  711.  
  712.           Mail or FAX this form to:     MicroSystems Development
  713.                                         4100 Moorpark Ave. #104
  714.           FAX:  (408)296-5877           San Jose, CA   95117   USA
  715.  
  716.           8                                       PORT TEST User's Manual
  717.  
  718.